﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Stdby/ABM/MasterPageAbm/MasterPageABM.master"
    AutoEventWireup="true" CodeFile="bolsas.aspx.cs" Inherits="Stdby_ABM_bolsas" %>

<%@ Register Src="~/Seguridad/UserControl/SeguridadAutenticador.ascx" TagName="Autenticador"
    TagPrefix="aut" %>
<asp:Content ID="Content1" ContentPlaceHolderID="agregarScript" runat="Server">
    <style type="text/css">
        .style36
        {
            width: 101px;
        }
        .style50
        {
            width: 214px;
        }
        .style53
        {
            width: 101px;
            height: 1px;
        }
        .style54
        {
            width: 226px;
            height: 1px;
        }
        .style55
        {
            width: 93px;
            height: 1px;
        }
        .style57
        {
            width: 248px;
        }
        .style58
        {
            width: 198px;
        }
        .style59
        {
            width: 93px;
        }
        .style60
        {
            width: 226px;
        }
    </style>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="Titulo" runat="Server">
    <div style="text-align: center;">
        <h1>
            Bolsas</h1>
    </div>
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="CamposBusqueda" runat="Server">
    <div align="center">
        <table style="text-align: left; width: 90%;">
            <tr>
                <td>
                    Descripción:
                </td>
            </tr>
            <tr>
                <td>
                    <asp:TextBox ID="txtDescripcionBuscar" runat="server" Width="100%"></asp:TextBox>
                </td>
            </tr>
            <tr>
                <td>
                    Pliego:
                </td>
            </tr>
            <tr>
                <td>
                    <asp:TextBox ID="txtLargoBuscar" runat="server" Width="40%"></asp:TextBox>
                    <asp:Label ID="lblPliegoBuscar" runat="server" ForeColor="Black" Text="X" Visible="false"></asp:Label>
                    <asp:TextBox ID="txtAnchoBuscar" runat="server" Width="40%"></asp:TextBox>
                </td>
            </tr>
            <tr>
                <td>
                    Inactivo:
                </td>
            </tr>
            <tr>
                <td>
                    <asp:DropDownList ID="cboInactivoBuscar" runat="server" Width="100%">
                        <asp:ListItem>No</asp:ListItem>
                        <asp:ListItem>Si</asp:ListItem>
                    </asp:DropDownList>
                </td>
            </tr>
        </table>
    </div>
</asp:Content>
<asp:Content ID="Content4" ContentPlaceHolderID="BotonBusqueda" runat="Server">
    <asp:Button ID="btnBuscar" runat="server" Text="Buscar" OnClick="btnBuscar_Click"
        Width="60%" />
</asp:Content>
<asp:Content ID="Content8" ContentPlaceHolderID="tituloOperacion" runat="Server">
    <asp:Label ID="lblNuevo" runat="server" Text="Nuevo"></asp:Label>
</asp:Content>
<asp:Content ID="Content5" ContentPlaceHolderID="GuardarDatos" runat="Server">
    <asp:UpdatePanel ID="UpdatePanel1" runat="server">
        <ContentTemplate>
            <table class="tablaDatos">
                <tr>
                    <td class="style58">
                        Descripción:
                    </td>
                    <td colspan=3>
                        <asp:TextBox ID="txtDescripcion" runat="server" Width="97%" MaxLength="200"></asp:TextBox>
                        <asp:Label ID="lblDescripcion" runat="server" Text="*" Visible="false" ForeColor="#FF0000"></asp:Label>
                    </td>
                    <td colspan=2>
                        <asp:CheckBox Text="Inactivo" ID="chkInactivo" runat="server" TextAlign=Left/>
                    </td>
                </tr>
                <tr>
                    <td class="style58">
                        Cartulina / Papel:
                    </td>
                    <td >
                        <asp:DropDownList ID="cboCartulinaPapel" runat="server"  Width="83%" 
                            onselectedindexchanged="cboCartulinaPapel_SelectedIndexChanged" AutoPostBack="true"/>
                        <asp:Label ID="lblCartulinaPapel" runat="server" Text="*" Visible="false" ForeColor="#FF0000"></asp:Label>
                    </td>
                    <td class="style36">
                        Tipo:
                    </td>
                    <td class="style60" >
                        <asp:DropDownList ID="cboMaterial" runat="server" Width="86%" Enabled=false/>
                        <asp:Label ID="lblMaterial" runat="server" ForeColor="#FF0000" Text="*" Visible="false"></asp:Label>
                    </td>
                    <td class="style59">
                        Gramaje:
                    </td>
                    <td >
                        <asp:DropDownList ID="cboGramaje" runat="server" Width="92%" 
                            Enabled="False" />
                        <asp:Label ID="lblGramaje" runat="server" ForeColor="#FF0000" Text="*" Visible="false"></asp:Label>
                    </td>
                </tr>
                <tr>
                    <td class="style58" >
                        Pliego (Largo x Ancho):
                    </td>
                    <td class="style50">
                        <asp:TextBox ID="txtLargo" runat="server" Width="27%" MaxLength="5"></asp:TextBox>
                        <asp:Label ID="lblX" runat="server" ForeColor="Black" Text="X" ></asp:Label>
                        <asp:TextBox ID="txtAncho" runat="server" Width="27%" MaxLength="5"></asp:TextBox>
                        <asp:Label ID="lblCmPliego" runat="server" Text="cm." Visible="true"></asp:Label>    
                        <asp:Label ID="lblPliego" runat="server" ForeColor="#FF0000" Text="*" Visible="false"></asp:Label>
                    </td>
                    <td class="style36">
                        Boca:
                    </td>
                    <td class="style60" >
                        <asp:DropDownList ID="cboBoca" runat="server" Width="86%"/>
                        <asp:Label ID="lblBoca" runat="server" ForeColor="#FF0000" Text="*" Visible="false"></asp:Label>
                    </td>
                </tr>
                <tr>
                    <td class="style58" >
                        Colores de Impresión:</td>
                    <td >
                        <asp:DropDownList ID="cboColoresDeImpresion" runat="server" Width="83%" 
                            AutoPostBack="True" 
                            onselectedindexchanged="cboColoresDeImpresion_SelectedIndexChanged" />
                        <asp:Label ID="lblColoresDeImpresion" runat="server" ForeColor="#FF0000" Text="*" Visible="false"></asp:Label>
                    </td>
                    <td class="style36">
                        Tintas: </td>
                    <td class="style60" >
                        <asp:ListBox runat="server" ID="lstTintas" Width="86%" SelectionMode="Multiple" Enabled="False" AutoPostBack="false"></asp:ListBox>
                    </td>
                    <td class="style59">
                        Accesorios: </td>
                    <td >
                        <asp:ListBox runat="server" ID="lstAccesorios" Width="91%" 
                            SelectionMode=Multiple 
                            onselectedindexchanged="lstAccesorios_SelectedIndexChanged" 
                            AutoPostBack="True"></asp:ListBox>
                    </td>
                </tr>
                <tr>
                    <td class="style58" >
                        Refuerzo Cartulina (Largo x Ancho):</td>
                    <td >
                        <asp:RadioButtonList ID="rdbRefuerzoCartulina" runat="server" Enabled="False" RepeatDirection="Horizontal"
                            Width="80%">
                            <asp:ListItem  Selected="True">Si</asp:ListItem>
                            <asp:ListItem>No</asp:ListItem>
                        </asp:RadioButtonList>

                        <asp:TextBox ID="txtRefuerzoCartulinaLargo" runat="server" Width="27%" 
                            Enabled="False" MaxLength="5"></asp:TextBox>
                        <asp:Label ID="txtRefuerzoCartulinaX" runat="server" ForeColor="Black" Text="X" ></asp:Label>
                        <asp:TextBox ID="txtRefuerzoCartulinaAncho" runat="server" Width="27%" 
                            Enabled="False" MaxLength="5"></asp:TextBox>
                        <asp:Label ID="lblCmRefuerzo" runat="server" Text="cm." Visible="true"></asp:Label>    
                        <asp:Label ID="lblRefuerzoCartulina" runat="server" ForeColor="#FF0000" Text="*" Visible="false"></asp:Label>
                    </td>
                    <td class="style53">
                        Impresión Interior:</td>
                    <td class="style54">
                        <asp:RadioButtonList ID="rdbImpresionInterior" runat="server" RepeatDirection="Horizontal"
                            Width="80%">
                            <asp:ListItem>Si</asp:ListItem>
                            <asp:ListItem  Selected="True">No</asp:ListItem>
                        </asp:RadioButtonList>
                    </td>
                    <td class="style55">
                        Costo $:
                    </td>
                    <td >
                        <asp:TextBox ID="txtCosto" runat="server" Width="92%" Enabled=false 
                            MaxLength="5"></asp:TextBox>
                        <asp:Label ID="lblCosto" runat="server" ForeColor="#FF0000" Text="*" Visible="false"></asp:Label>
                    </td>
                </tr>
                <tr>
                    <td class="style58">
                        Manija:</td>
                    <td >
                        <asp:DropDownList ID="cboManija" runat="server" Width="84%"/>
                        <asp:Label ID="lblManija" runat="server" ForeColor="#FF0000" Text="*" Visible="false"></asp:Label>
                    </td>
                    <td class="style36">
                        Medida Cinta:</td>
                    <td class="style60" >
                        <asp:TextBox ID="txtMedidaCinta" runat="server" Width="75%" MaxLength="5"></asp:TextBox>
                        <asp:Label ID="lblCm" runat="server" Text="cm." Visible="true"></asp:Label>    
                        <asp:Label ID="lblMedidaCinta" runat="server" ForeColor="#FF0000" Text="*" Visible="false"></asp:Label>    
                    </td>
                    <td class="style59" >
                        Color Manija:
                    </td>
                    <td >
                        <asp:TextBox ID="txtColorManija" runat="server" Width="92%" MaxLength="20"></asp:TextBox>
                        <asp:Label ID="lblColorManija" runat="server" ForeColor="#FF0000" Text="*" Visible="false"></asp:Label>
                    </td>
                </tr>
            </table>
        </ContentTemplate>
    </asp:UpdatePanel>
</asp:Content>
<asp:Content ID="Content6" ContentPlaceHolderID="Guardar" runat="Server">
    <asp:Button ID="btnGuardar" runat="server" Text="Guardar" Width="10%" OnClick="btnGuardar_Click"
        OnClientClick="confirmar();" Style="margin-right: 20px;" />
    <asp:Button ID="btnCancelar" runat="server" Text="Cancelar" Width="10%" OnClick="btnCancelar_Click" />
</asp:Content>
<asp:Content ID="Content7" ContentPlaceHolderID="Grilla" runat="Server">
    <asp:UpdatePanel ID="UpdatePanel2" runat="server">
        <ContentTemplate>
            <asp:GridView ID="grilla" runat="server" PageSize="20" AllowPaging="True" EmptyDataText="No hay Datos."
                ShowHeaderWhenEmpty="True" Width="100%" AutoGenerateColumns="False" OnPageIndexChanging="grilla_PageIndexChanging"
                OnSelectedIndexChanged="grilla_SelectedIndexChanged" OnRowDataBound="grilla_RowDataBound"
                DataKeyNames="id" CellSpacing="2" BorderStyle="Solid" BorderWidth="2px" BorderColor="#2262FA"
                AllowSorting="True" OnSorting="grilla_Sorting" >
                <Columns>
                    <asp:CommandField ShowSelectButton="True" SelectImageUrl="~/App_Themes/pencil.ico"
                        SelectText="Editar" ButtonType="Image">
                        <ItemStyle HorizontalAlign="Center" VerticalAlign="Middle" />
                    </asp:CommandField>

                    <%--<asp:BoundField DataField="id" HeaderText="ID" SortExpression="id" Visible="False" />--%>
                    <asp:BoundField DataField="descripcion" HeaderText="Descripción" SortExpression="descripcion" />
                   
                    <asp:BoundField DataField="pliegoLargo" HeaderText="Largo" SortExpression="pliegoLargo" HtmlEncode="False" />
                    <asp:BoundField DataField="pliegoAncho" HeaderText="Ancho" SortExpression="pliegoAncho" HtmlEncode="False" />

                    <asp:CheckBoxField DataField="deBaja" HeaderText="Inactivo" SortExpression="deBaja">
                        <HeaderStyle Width="5%" />
                        <ItemStyle HorizontalAlign="Center" VerticalAlign="Middle" />
                    </asp:CheckBoxField>
                
                </Columns>
                <HeaderStyle BackColor="ActiveCaption" Font-Bold="True" Font-Size="Small" ForeColor="White"
                    Height="30px" HorizontalAlign="Center" VerticalAlign="Middle" />
                <PagerStyle BackColor="#2262FA" Font-Bold="True" Font-Size="Small" ForeColor="White"
                    Height="10px" HorizontalAlign="Center" VerticalAlign="Middle" />
                <SelectedRowStyle BackColor="#999999" Font-Bold="True" Font-Size="Small" ForeColor="White"
                    Height="20px" VerticalAlign="Middle" />
            </asp:GridView>
        </ContentTemplate>
    </asp:UpdatePanel>
    <aut:Autenticador ID="Autenticacion" runat="server" PermisosRequeridos="ABM" />
</asp:Content>
